home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_A / FHC.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  77 lines

  1. /* $Id: fhc.h,v 1.4 1998/12/14 12:18:20 davem Exp $
  2.  * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire.
  3.  *
  4.  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
  5.  */
  6.  
  7. #ifndef _SPARC64_FHC_H
  8. #define _SPARC64_FHC_H
  9.  
  10. #include <linux/timer.h>
  11.  
  12. #include <asm/firehose.h>
  13. #include <asm/oplib.h>
  14.  
  15. struct linux_fhc;
  16.  
  17. struct clock_board_regs {
  18.     u8    control;
  19.     u8    _unused1[0x10 - 0x01];
  20.     u8    stat1;
  21.     u8    _unused2[0x10 - 0x01];
  22.     u8    stat2;
  23.     u8    _unused3[0x10 - 0x01];
  24.     u8    pwr_stat;
  25.     u8    _unused4[0x10 - 0x01];
  26.     u8    pwr_presence;
  27.     u8    _unused5[0x10 - 0x01];
  28.     u8    temperature;
  29.     u8    _unused6[0x10 - 0x01];
  30.     u8    irq_diag;
  31.     u8    _unused7[0x10 - 0x01];
  32.     u8    pwr_stat2;
  33.     u8    _unused8[0x10 - 0x01];
  34. };
  35.  
  36. #define CLOCK_CTRL_LLED        0x04    /* Left LED, 0 == on */
  37. #define CLOCK_CTRL_MLED        0x02    /* Mid LED, 1 == on */
  38. #define CLOCK_CTRL_RLED        0x01    /* RIght LED, 1 == on */
  39.  
  40. struct linux_central {
  41.     struct linux_fhc        *child;
  42.     volatile u8            *cfreg;
  43.     struct clock_board_regs        *clkregs;
  44.     volatile u8            *clkver;
  45.     int                slots;
  46.     int                prom_node;
  47.     char                prom_name[64];
  48.  
  49.     struct linux_prom_ranges    central_ranges[PROMREG_MAX];
  50.     int                num_central_ranges;
  51. };
  52.  
  53. struct linux_fhc {
  54.     struct linux_fhc        *next;
  55.     struct linux_central        *parent;    /* NULL if not central FHC */
  56.     struct fhc_regs            fhc_regs;
  57.     int                board;
  58.     int                jtag_master;
  59.     int                prom_node;
  60.     char                prom_name[64];
  61.  
  62.     struct linux_prom_ranges    fhc_ranges[PROMREG_MAX];
  63.     int                num_fhc_ranges;
  64. };
  65.  
  66. extern struct linux_central *central_bus;
  67.  
  68. extern void prom_apply_central_ranges(struct linux_central *central, 
  69.                       struct linux_prom_registers *regs,
  70.                       int nregs);
  71.  
  72. extern void prom_apply_fhc_ranges(struct linux_fhc *fhc, 
  73.                    struct linux_prom_registers *regs,
  74.                   int nregs);
  75.  
  76. #endif /* !(_SPARC64_FHC_H) */
  77.